#include <iostream>
using namespace std;
int main()
{
	double score;
	cin >> score;
	while(score >= 0){
		if(score == 100){
			cout << "A+" << endl;
		}else if(90 <= score && score < 100){
			cout << "A" << endl;
		}else if(80 <= score && score < 90){
			cout << "B" << endl;
		}else if(70 <= score && score < 80){
			cout << "C" << endl;
		}else if(60 <= score && score < 70){
			cout << "D" << endl;
		}else if(0 <= score && score < 60){		//You can also use else{...}
			cout << "E" << endl;
		}
		cin >> score;
	}
	return 0;
}